// request 是我们封装的一个网络请求库
import request from './../utils/request';
import config from './../config';
import {
    empty,
    message
} from './../utils/helper';

const url = config.service.host;
const obj = {
    success: function (res) {
        console.log(res)
    },
    fail: function (res) {
        message(res.msg)
    },
    complete: function (res) { }
};

//获取分享信息
export function getMyPay(params, cb = {}) {
    const f = Object.assign(obj, cb);
    request(`${url}/Center/getMyPay`, params).then((res) => {
        if (typeof res == "object") {
            if (res.status == "OK") {
                f.success(res);
            } else {
                f.fail(res);
            }
            f.complete(res);
        } else {
            console.warn(res);
        }
    })
}